'use strict';

const Service = require('../core/common');

class FeedbacksService extends Service {
  findAll(params = {}) {
    const { ctx } = this;

    return ctx.model.Feedbacks.findAndCountAll(this.paging(params));
  }

  create(params = {}) {
    const { ctx } = this;

    return ctx.model.Feedbacks.create(params);
  }

  update(params = {}, where = {}) {
    const { ctx } = this;

    return ctx.model.Feedbacks.update(params, where);
  }

  destroy(params) {
    const { ctx } = this;

    return ctx.model.Feedbacks.destroy(params);
  }
}

module.exports = FeedbacksService;